// 引入默认首页
import OrderIndex from '@/components/order/index.vue'
import OrderExpress from '@/components/order/express.vue'
import OrderInfo from '@/components/order/info.vue'
import OrderComment from '@/components/order/comment.vue'
import Depot from '@/components/order/depot.vue'
import DepotInfo from '@/components/order/depotinfo.vue'

// 子路由列表
const children = [//子路由
    {
        name: 'OrderIndex',
        path: 'index',
        component:OrderIndex,
        meta:{auth:true}
    },
    {
        name: 'OrderExpress',
        path: 'express',
        component:OrderExpress,
        meta:{auth:true}
    },
    {
        name: 'OrderInfo',
        path: 'info',
        component:OrderInfo,
        meta:{auth:true}
    },
    {
        name: 'OrderComment',
        path: 'comment',
        component:OrderComment,
        meta:{auth:true}
    },
    {
        name: 'Depot',
        path: 'depot',
        component:Depot,
        meta:{auth:true}
    },
    {
        name: 'DepotInfo',
        path: 'depotinfo',
        component:DepotInfo,
        meta:{auth:true}
    },
]

// 1级路由的组件
const layout = {
    template: `<router-view></router-view>`
}

// 创建路由对象
export default {
    name: 'order',
    path: '/order', //一级路由
    component: layout, //组件
    children: children
}